package main

import (
	"encoding/json"
	"log"
)

func main() {
	type Result struct {
		status  int8
		Message string
		Tes1    float32
		Ftest2  float64
		Tests   interface{}
	}

	// rsmap := map[string]interface{}
	rsmap := make(map[string]interface{})
	rsmap["s"] = -1

	// rs := &Result{-1, "test啥地方就是2", 1, 1.0, 2}
	b, err := Decode(rsmap)
	log.Print(string(b), err)
	var v2 interface{}
	v1 := json.Unmarshal([]byte("{\"a\":[{\"s\":-1},{\"s\":-1.001}]}"), &v2)
	log.Print(v1, v2)
}

func Decode(v interface{}) (string, error) {
	b, err := json.Marshal(v)
	return string(b), err
}
